﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;

namespace Mindfor.Web.Data
{
	/// <summary>
	/// Provides functions to invoke code before database operation.
	/// </summary>
	public interface IPreCommit
	{
		/// <summary>
		/// Invoked before data item is inserted.
		/// </summary>
		void OnPreInsert(ISession data);

		/// <summary>
		/// Invoked before data item is updated.
		/// </summary>
		void OnPreUpdate(ISession data);

		/// <summary>
		/// Invoked before data item is deleted.
		/// </summary>
		void OnPreDelete(ISession data);
	}
}
